#!/usr/bin/python3.8.9
# -*- coding: utf-8 -*-

# @Author  : Tina Yu
# @Time    : 2022-2-20 14:56

"""
Basic skeleton of a mitmproxy addon.

Run as follows: mitmproxy -s anatomy.py
"""
from mitmproxy import ctx


class Counter:
    def __init__(self):
        self.num = 0

    # 监听request
    def request(self, flow):
        self.num = self.num + 1
        ctx.log.info(f"We've seen {self.num} flows")


addons = [
    Counter()
]
